#
#  rubygems-test.rb
#  
#
#  Created by Zhang Ximin on 8/4/10.
#  Copyright (c) 2010 Columbia University. All rights reserved.
#

require 'watir'
require 'rubygems'

b = Watir::Browser.new()
b.goto("http://widersite.qa.shermanstravel.com/top25/signup")


b = Watir::Browser.new()
b.goto("http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModalDialog2.htm")
b.button(:value,"Push To Create").click_no_wait
puts b.modal_dialog(:title, "showModalDialog Method Sample Target Page").exists?
puts b.modal_dialog(:title, "showModalDialog Method Sample Target Page").title
b.modal_dialog(:title, "showModalDialog Method Sample Target Page").close

=begin
def startClicker( button , waitTime = 3)
   w = WinClicker.new
   longName = $ie.dir.gsub("/" , "\\" )
   shortName = w.getShortFileName(longName)
   c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} "
   puts "Starting #{c}"
   w.winsystem(c)
   w=nil
end
 
 startClicker("http://i.stcdn.net/top25/new_signup/subscribe.jpg", 4)
 
b.button(:src,"http://i.stcdn.net/top25/new_signup/subscribe.jpg").click_no_wait
=end